#ifndef BERNOULLI_H
#define BERNOULLI_H

/* NOTE: in BLOG true is 0 and false is 1 */

typedef struct Bernoulli_t
{
  double mean;
  int fixed_mean;
} Bernoulli_t;

/* the parameter must be a single double precision number */
void Bernoulli_Init_Params(Bernoulli_t * dist, int nparams, ...);

#define Bernoulli_Init_Args while(0)

int Bernoulli_Sample(const Bernoulli_t * dist, int nargs, ...);

double Bernoulli_LogProb(const Bernoulli_t * dist, int val, int nargs, ...);
double Bernoulli_Prob(const Bernoulli_t * dist, int val, int nargs, ...);

#endif


